#define _CRT_SECURE_NO_WARNINGS 1
int* selfDividingNumbers(int left, int right, int* returnSize) {
    int* ret_nums = (int*)malloc(sizeof(int) * (right - left));
    int j = 0;
    *returnSize = 0;
    for (int i = left; i <= right; i++)
    {
        int n = i;
        int flag = 1;
        while (n)
        {
            if (n % 10 == 0)
            {
                flag = 0;
                break;
            }
            if ((i % (n % 10)) != 0)
            {
                flag = 0;
            }
            n /= 10;

        }
        if (flag == 1)
        {
            ret_nums[j++] = i;
            (*returnSize)++;
        }
    }
    return ret_nums;
}